<#--
* SingleSelect
-->
<#macro SingleSelect path options labelText=path labelShow=true text="0" value="0" display="layui-input-block" required="" class="" attributes="">
  <@spring.bind path/>
  <#assign id="${spring.status.expression?replace('[','')?replace(']','')}">
  <div class="layui-form-item">
    <#if labelShow>
        <label class="layui-form-label" for="${id}">
            <#if required?contains("required")><b style="color:red;padding:2px;vertical-align: middle;">*</b></#if>${labelText}
        </label>
        <div class="${display}" style="min-width:220px;">
              <select id="${id}" name="${spring.status.expression}" class="${class}" lay-filter="${id}" 
                lay-verify="${required}" lay-verType="tips" lay-reqText="请选择${labelText}" ${attributes}>
                <#nested>
                <#if options?is_hash>
                  <#list options?keys as value>
                    <option value="${value?html}"<@spring.checkSelected value/>>${options[value]?html}</option>
                  </#list>
                <#elseif options?is_sequence> 
                  <#list options as item>
                    <option value="${item[value]?html}"<@spring.checkSelected item[value]/>>${item[text]?html}</option>
                  </#list>
                <#else>
                  <#list options as value>
                    <option value="${value?html}"<@spring.checkSelected value/>>${value?html}</option>
                  </#list>
                </#if>
              </select>
        </div>
    <#else>
        <div class="layui-input-inline">
              <select id="${id}" name="${spring.status.expression}" class="${class}" lay-filter="${id}"
               lay-verify="${required}" lay-verType="tips" lay-reqText="请选择${labelText}" ${attributes}>
                <#nested>
                <#if options?is_hash>
                  <#list options?keys as value>
                    <option value="${value?html}"<@spring.checkSelected value/>>${options[value]?html}</option>
                  </#list>
                <#elseif options?is_sequence> 
                  <#list options as item>
                    <option value="${item[value]?html}"<@spring.checkSelected item[value]/>>${item[text]?html}</option>
                  </#list>
                <#else>
                  <#list options as value>
                    <option value="${value?html}"<@spring.checkSelected value/>>${value?html}</option>
                  </#list>
                </#if>
              </select>
        </div>
    </#if>
  </div>
</#macro>

<#--
* SingleSelectQuery
-->
<#macro SingleSelectQuery path options labelText=path text="0" value="0" class="" attributes="">
  <@spring.bind path/>
  <#assign id="${spring.status.expression?replace('[','')?replace(']','')}">
   <div class="layui-form-item margin-5">
      <label class="layui-form-label" for="${id}">${labelText}</label>
      <div class="layui-input-inline">
          <select id="${id}" class="width-190 ${class}" name="${spring.status.expression}" lay-filter="${id}" ${attributes} >
            <#nested>
            <#if options?is_hash>
              <#list options?keys as value>
                <option value="${value?html}"<@spring.checkSelected value/>>${options[value]?html}</option>
              </#list>
            <#elseif options?is_sequence> 
              <#list options as item>
                <option value="${item[value]?html}"<@spring.checkSelected item[value]/>>${item[text]?html}</option>
              </#list>
            <#else>
              <#list options as value>
                <option value="${value?html}"<@spring.checkSelected value/>>${value?html}</option>
              </#list>
            </#if>
          </select>
      </div>
  </div>
</#macro>